home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / networking / HIPPIperf.txt < prev    next >
Encoding:
Text File  |  1996-11-11  |  30.3 KB  |  552 lines

  1.  _____________________________________________________________________________
  2.  
  3.     Copyright 1994, Silicon Graphics, Inc. All Rights Reserved.
  4.  
  5.     THIS DOCUMENT CONTAINS UNPUBLISHED INFORMATION OF SGI
  6.  
  7.     The copyright notice above does not evidence any actual or
  8.     intended publication or disclosure of this document, which
  9.     includes information that is the confidential and/or
  10.     proprietary, and is a trade secret, of Silicon Graphics, Inc.
  11.  
  12.     ANY DUPLICATION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE,
  13.     OR PUBLIC DISPLAY OF THIS DOCUMENT OR ANY OR ANY PORTION OF THIS
  14.     DOCUMENT, WITHOUT THE EXPRESS WRITTEN CONSENT OF SILICON GRAPHICS,
  15.     INC. IS STRICTLY PROHIBITED.  THE RECEIPT OR POSSESSION OF THIS
  16.     DOCUMENT DOES NOT CONVEY ANY RIGHTS TO REPRODUCE, DISCLOSE OR
  17.     DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING
  18.     THAT IT MAY DESCRIBE, IN WHOLE OR IN PART.
  19.  _____________________________________________________________________________
  20.  
  21.   
  22.             toolbox/src/exampleCode/networking/HIPPI/HIPPIperf.txt
  23.  
  24.  
  25.                        HIPPI Performance on IRIX 5.2
  26.  
  27.                                     by
  28.  
  29.                                 Paul Reilly
  30.                                MSD Marketing
  31.                            Silicon Graphics, Inc.
  32.  
  33.                                June 24, 1994
  34.  
  35.  
  36.   SUMMARY: This white paper explores the performance envelope of Silicon 
  37.   Graphics IRIS HIPPI version 1.0 as run on the CHALLENGE(TM) and Onyx(TM)
  38.   computer systems running IRIX version 5.2.  This report is for the HIPPI
  39.   expert.
  40.  
  41.  
  42.  
  43.   Acknowledgments:
  44.   We wish to thank the following people who have contributed to this 
  45.   white paper (in alphabetic order):
  46.    Scott Bovenizer, Lise Garrett, Thomas Skibo, Rob Warnock, and Audy Watson.
  47.  
  48.   (C) Copyright 1994, Silicon Graphics, Inc. All Rights Reserved
  49.  
  50.   HIPPI Performance on IRIX 5.2
  51.   Silicon Graphics, Inc.
  52.   Mountain View, California
  53.  
  54.   IRIS, Silicon Graphics, and the Silicon Graphics logo are registered 
  55.   trademarks and CHALLENGE, Onyx, POWER Channel and IRIX are 
  56.   trademarks of Silicon Graphics, Inc.
  57.   NFS is a registered trademark of Sun Microsystems, Inc.
  58.   UNIX is a registered trademark of UNIX System Laboratories, Inc.
  59.  
  60.   Introduction.
  61.   =============
  62.   Once upon a time, we had one of those `muscle' cars with 427 cubic inch 
  63.   engines, four-on-the-floor, traction control, and a radio blaring Beach 
  64.   Boys music at 110 dB.  Of course, that was a very long time ago, back 
  65.   when the Beach Boys were still boys. 
  66.     Much has changed in the intervening years. Those originals gave way to 
  67.   a series of progressively more `sensible' cars until our present vehicle
  68.   is barely capable of exceeding legal speed limit.  Yet the memories 
  69.   linger of the weekends at the drag strip, the roar of powerful engines, 
  70.   the smell of burning rubber, the dreams of breaking a ten second elapse 
  71.   time....
  72.     While not quite as exciting as burning rubber for a hundred yards, we 
  73.   just had the opportunity to relive a little of that excitement. Silicon 
  74.   Graphics has recently announced a new IRIS HIPPI card for the 
  75.   CHALLENGE(TM) and Onyx(TM) families of computer systems, and we were 
  76.   asked to see just what it can do. A one word summary of the results is 
  77.   Awesome! 
  78.  
  79.   The IRIS HIPPI Interface:
  80.     A detailed description of the IRIS HIPPI interface in beyond the scope 
  81.   of this white paper--the documentation does an excellent job. Therefore,
  82.   we recommend that if you are interested in the implementation details, 
  83.   you obtain a copy of IRIS HIPPI Administrator's Guide, Document Number 
  84.   007-2229-002 which gives a fairly detailed description of the board's 
  85.   hardware implementation. 
  86.     Of equal importance is the IRIS HIPPI API Programmer's Guide, Document 
  87.   Number 007-2227-001. This describes the various software interfaces 
  88.   available to the IRIS HIPPI interface, including the HIPPI-PH layer 
  89.   which equates to raw mode I/O. You can get copies of this documentation 
  90.   from your local Silicon Graphics sales representative. 
  91.     Since most of you are probably interesting in the HIPPI-PH interface, 
  92.   we have attached example programs which use it in the appendices of this 
  93.   white paper. These are sink and blast. Neither is a complete, finished 
  94.   program. They are merely working examples, or so-called scrub programs 
  95.   which demonstrate how one should actually program the HIPPI-PH interface
  96.   of IRIS HIPPI. However, they are working programs which you can try out 
  97.   on your IRIS HIPPI cards and tinker with to see just what performance 
  98.   you can get. In fact, we used them as part of the testing that went into 
  99.   this report.
  100.   
  101.   The Machines:
  102.   =============
  103.     Naturally enough, we should start this performance report with a 
  104.   description of the equipment used. The systems used were a base model 
  105.   CHALLENGE L and a desk side Onyx, each with two 150 Mhz processors, 256 
  106.   MB of memory (one-way interleaved), and a POWER Channel(TM) 2 (IO4). One 
  107.   HIO port had a SCSI adapter installed, while the other HIO port had the 
  108.   IRIS HIPPI card attached to it. The two systems were directly connected 
  109.   by HIPPI cables with no switch in between. 
  110.     The disk subsystem, consisted of six fast and wide SCSI disks attached
  111.   to each system as a six-way-striped logical volume, with the disks 
  112.   striped three each on each of two controllers.
  113.     Thus, the two systems were fairly common configurations, ones that you 
  114.   yourself are likely to have. As we will see, the disk configuration was 
  115.   the weak link--the IRIS HIPPI card was easily able to stay well ahead of 
  116.   this disk configuration.
  117.  
  118.   The Software:
  119.     Each system was loaded with the released version of IRIX(TM) 5.2 and 
  120.   version 1.0 of the IRIS HIPPI driver and related software. The only 
  121.   tuning of the software was that the default TCP window/socket space was 
  122.   increased to 512 KB. That is, in /var/sysgen/master.d/bsd 
  123.  
  124. unsigned long tcp_sendspace = 60 * 1024; /* must be < 256K */ 
  125. unsigned long tcp_recvspace = 60 * 1024; /* must be < 256K */
  126.  
  127.   was changed to
  128.  
  129. unsigned long tcp_sendspace = 512 * 1024; /* must be < 256K */
  130. unsigned long tcp_recvspace = 512 * 1024; /* must be < 256K */
  131.  
  132.   Please note that the comments on these two lines are incorrect, the 
  133.   maximum size is 512 KB.
  134.   
  135.   On to the Drag Strip:
  136.   =====================
  137.     Naturally, whenever you have a shiny new hot rod, the first thing you 
  138.   want to do is to see just how fast it really is--so you take it to the 
  139.   local drag strip and burn rubber. The UNIX equivalent of the drag strip 
  140.   is raw mode I/O, which in the case of IRIS HIPPI translates into 
  141.   HIPPI-PH.
  142.     As noted above, we used blast and sink to wring this interface out. 
  143.   They are attached in the appendices, and will be made available on a 
  144.   forthcoming developers toolbox.
  145.     If you read the listings, you will find that blast, the transmitting 
  146.   program, has several options.
  147.     The first is -1 or not. This controls whether it forks into two 
  148.   processes (-1 turns forking off). Since there are latency issues that 
  149.   effect performance such as doing the mpin and munpin of physical memory,
  150.   it is desirable to run at least two interleaved processes if possible. 
  151.   Since this interface runs only on a multiprocessor computer (there are 
  152.   always at least two CPUs), it makes sense to do this.
  153.     Since we were using only one HIPPI interface per system and no switch, 
  154.   the -D or -I switches, which define the device name and ifields, are not 
  155.   relevant.  
  156.     The final three options are the length of the write performed, the 
  157.   number of packets to be sent and the number of times to repeat the test. 
  158.   Various lengths of write were evaluated in powers of two from 256 to 2MB. 
  159.   The upper limit of 2MB was based on the amount of hardware buffering on 
  160.   the IRIS HIPPI board. It can handle a maximum of 2 MB. 
  161.     The results of running sink and blast over the IRIS HIPPI PH interface.
  162.   They are in megabytes per second as reported by blast. The left-hand-most 
  163.   column is the write size (in bytes) used. The second column is the results 
  164.   when -1 is not used. This means that there was a fork and subtasking was 
  165.   used. The third column is the results when -1 (no forking) was used.
  166.   
  167.  
  168.       I/O Size              (forking enabled)       (forking disabled)
  169.       (bytes)               (MB/s)                  (MB/s)
  170.           256                0.32                    0.32 
  171.           512                0.64                    0.66 
  172.          1024                1.36                    1.36 
  173.          2024                2.64                    2.71 
  174.          4096                5.28                    5.13 
  175.          8192                9.52                    9.52 
  176.         16384               16.62                   16.98 
  177.         32768               22.15                   24.16 
  178.         65536               33.60                   31.88 
  179.        131072               46.30                   37.88 
  180.        262144               61.88                   50.61 
  181.        524288               70.42                   62.19 
  182.       1048576               74.29                   70.13 
  183.       2097152               77.94                   73.21 
  184.  
  185.                                  Table 1
  186.        Results of running sink and blast over IRIS HIPPI PH interface
  187.  
  188.   
  189.     As you can see, the size of the I/O clearly makes a difference. The 
  190.   shorter I/O lengths gave fairly poor performance until the 512KB size 
  191.   was used. At that point, the performance gradually increased until the 
  192.   maximum of 78 MB/second was reached with 2MB writes and reads.
  193.     The second observation is that enabling forking to share the CPU 
  194.   compute load between two processors is a win. The performance difference 
  195.   between the two modes of running blast and sink is slight until you 
  196.   start using I/O with lengths greater than 64 KB. After that, there is a 
  197.   five to ten percent gain with forking enabled. 
  198.     One point not shown in Table 1 is that the IRIS HIPPI interface can 
  199.   actually transmit faster than it can receive, and so the results in 
  200.   Table 1 are the receive performance data. 
  201.     If you are interested in the transmit performance of IRIS HIPPI, you 
  202.   can let the interface run free by simply not starting the sink task on 
  203.   the receiving system. If you were to do this, then the rate for 2 MB 
  204.   writes (using blast alone) is close to 92 MB/second. 
  205.   
  206.   Cruising the TCP/IP Expressway:
  207.   ===============================
  208.     While HIPPI-PH is quite useful for a number of applications, all of 
  209.   them must be specially written to use it. There are, however, a large 
  210.   number of common programs which use the IP networking stack. Among them 
  211.   are rcp, ftp as well as NFS. 
  212.      We will start with NFS. NFS is a request/response protocol in which 
  213.   the client sends a request and then waits until the response (usually 
  214.   just a 8KB block of data) is fulfilled. History has shown that NFS is 
  215.   self-limiting, generally in the order of 800,000 bytes per second, 
  216.   which is roughly the bandwidth of ethernet. When FDDI first came out, 
  217.   everybody was surprised when NFS performance was only about 10% faster 
  218.   on FDDI than it was on ethernet. The NFS implementation is being further 
  219.   developed to improve its performance on these higher bandwidth media. 
  220.   These enhancements will be incorporated into version 5.3 of IRIX. 
  221.     On the other hand, TCP is well suited to high speed interfaces such as
  222.   HIPPI. The reason is that it uses a sliding-window buffer to keep the 
  223.   data flowing almost as though there was a conveyor belt set up between 
  224.   the sender and receiver. It also has a number of very clever 
  225.   optimizations. One is `slow-start' which starts the data transfer over 
  226.   TCP at a fairly low rate and gradually (for a computer at least) 
  227.   increases the flow of data until either it finds that it lost a packet 
  228.   or it reaches full-throttle. There is also something called MTU 
  229.   discovery which permits two TCP entities to negotiate the size of 
  230.   packets to be sent between them. Thus, TCP is self-governing, adapting 
  231.   itself to conditions on the network. Tuning Silicon Graphics' TCP for 
  232.   Speed. 
  233.     Recently, RFC 1323 was published which includes additional TCP 
  234.   performance improvements. However, some of them, such as large window 
  235.   sizes, will actually cause performance losses in older systems that 
  236.   don't have them. So to keep the peace, we ship IRIX with these in it 
  237.   and then turn them off so as to keep compatibility with the older 
  238.   versions of TCP. The controlling variables can be found in 
  239.   /var/sysgen/master.d/bsd. They read:
  240.   
  241. /* TCP window sizes/socket space reservation */ 
  242. unsigned long tcp_sendspace = 60 * 1024; /* must be < 256K */ 
  243. unsigned long tcp_recvspace = 60 * 1024; /* must be < 256K */
  244. /* TCP large windows (RFC 1323) control. */
  245. int tcp_winscale = 1; 
  246. int tcp_tsecho = 1;
  247.  
  248.   The last two variables are set to true and should be left that way. The
  249.   way we actually control whether RFC 1323's features are turned on is by 
  250.   the window sizes. If they are set to 60 * 1024 or less, then the 
  251.   assumption is that the RFC 1323 features should not be used. On the 
  252.   other hand, if the window size as set to greater than 60 KB, then they 
  253.   should be used.
  254.     There are two ways of doing this. First, you can, as we did, edit the 
  255.   file and increase tcp_sendspace and tcp_recvspace. And as noted above, 
  256.   the correct upper limit is 512KB, not 256KB. What this does is set the 
  257.   default TCP window sizes. You can also set the window sizes by a 
  258.   setsockopt call. This is handy in that you can selectively increase the 
  259.   TCP window size for a particular interface such a HIPPI without 
  260.   increasing it for all your networking interfaces. We will get back to 
  261.   this in a moment when we discuss ttcp below. The reason we chose to edit 
  262.   the /var/sysgen/master.d/bsd file was that some programs, such as ftp, 
  263.   do not have this setsockopt call, and so this forces you to increase the 
  264.   window sizes by using the defaults defined in /var/sysgen/master.d/bsd.
  265.  
  266.   Memory-to-Memory TCP/IP performance over HIPPI.
  267.     For sometime now, ttcp has been the acknowledged routine for testing 
  268.   TCP/IP performance. It started out in the early 1980s as a program from
  269.   BRL, then followed several paths to virtually every UNIX implementation
  270.   that supports TCP/IP (which is virtually all of them.) The particular 
  271.   version used in this test is the one to be found in the optional 
  272.   eoe2.sw.ipgate subsytem that can be selected during inst. The source, or
  273.   a reasonably facsimile, is distributed in 
  274.   /usr/people/4Dgifts/examples/network, so if you don't have it on your 
  275.   system, or you would like to play with it, you can find it there.
  276.     While ttcp can be used to test UDP performance as well, we limited 
  277.   ourselves to the TCP/IP mode. ttcp can also be used to do disk reads 
  278.   and writes, but most people prefer to use rcp or ftp for that, so we 
  279.   used ttcp solely in its memory-to-memory mode. That is, we used the -s
  280.   switch.
  281.     A few words of warning need to be made about both ttcp and TCP/IP. 
  282.   First, ttcp can and does use all those neat features that make TCP/IP 
  283.   run fast, including slow-start, MTU discovery, and a host of other 
  284.   features. As noted, TCP/IP will spend several seconds when a transfer 
  285.   is first started to `feel' out the network and determine just how fast 
  286.   it can run. As we will see, very short runs--runs of less than 10 
  287.   seconds--give spuriously low performance. As a rule-of-thumb, you 
  288.   should never make a ttcp run of less than 30 seconds. We prefer 60 
  289.   seconds as a minimum. Thus, you should always set the -n switch to some
  290.   number which gives a run that last at least 30 seconds. Otherwise, you 
  291.   will not have valid results. Now for those results.
  292.   
  293.   The ttcp Results.
  294.   =================
  295.     We ran ttcp in TCP mode and memory-to-memory mode only. That is to 
  296.   say the generic ttcp command for receive was
  297.    #ttcp -r -s -l####
  298.   while the generic ttcp command for transmit was
  299.    #ttcp -t -s -l#### -n100000 -b524288 [-D] hippi-hostname
  300.   The values for -l#### varied from 256 to 65536 bytes by powers of 2, 
  301.   with the exception of 61440 which has a special meaning that we will 
  302.   explain in a minute. 
  303.     For all buffer sizes except 61440 and 65536, we used -n100000. In the 
  304.   case of -l61440 and -l65536, -n50000 was used instead. Thus, all tests 
  305.   ran for at least 17 seconds, while the longer lengths ran for about one 
  306.   minute. 
  307.     The -b524288 option sets the TCP window size to 524288 (or 512K), 
  308.   which could be used in place of the changes in /var/sysgen/master.d/bsd
  309.   noted above, (-b sets the socket buffer size of SO_SNDBUF/SO_RCVBUF with
  310.   a setsockopt call).
  311.     In addition, we used the -D to set TCP_NODELAY on some of the tests to
  312.   see what impact this feature would have on performance. Those results 
  313.   are indicated in Table 2.  The results of running ttcp in memory-only-
  314.   mode over IRIS HIPPI using TCP/IP. The various options for ttcp were as 
  315.   noted above. The results are in kilobytes per second (i.e. 1024) as 
  316.   reported by ttcp. The results for both the transmitting and receiving 
  317.   task of ttcp are shown.
  318.  
  319.  
  320.                     -D on          No -D 
  321.      I/O Size       Receive        Transmit       Receive       Transmit 
  322.      (bytes)             (kbytes/s)                     (kbytes/s)
  323.        256           1055           1055           1587           1588 
  324.        512           2463           2464           3498           3500 
  325.       1024           5803           5805           6208           6211 
  326.       2048          12143          12160          11786          11791 
  327.       4096          22001          22007          32626          32654 
  328.       8192          32972          32984          40666          40681 
  329.      16384          38756          38763          41334          41341 
  330.      32768          42235          42240          42908          42913 
  331.      61440          47192          47196          46213          46216 
  332.      65536          42100          42103          41992          41997
  333.  
  334.                                  Table 2
  335.   Results of running ttcp in memory-only-mode over IRIS HIPPI using TCP/IP
  336.    
  337.  
  338.     The results show that one can get very good TCP/IP performance over 
  339.   IRIS HIPPI. The maximum performance was about 47 to 48 MB/second. Not 
  340.   surprisingly, the performance increased as the size of the read/write 
  341.   increased, with the exception of 60KB (61440) which is clearly the sweet
  342.   spot in this series of tests. Then the performance falls off slightly at 
  343.   64KB. This is not unexpected. Remember that the IP has a 16-bit length 
  344.   field and so the size of a TCP/IP packet cannot be larger than 64KB. 
  345.   However, since you still have to wrap the TCP portion of the transmitted
  346.   frame with IP headers and trailers, you cannot really send a 64KB TCP 
  347.   packet without fragmentation. Thus, 60KB is the sweet spot as it is the 
  348.   largest hunk of user data that can be sent inside of 64KB TCP/IP 
  349.   encapsulation and still be a multiple of 4KB, the page size. Thus, we 
  350.   expected the maximum performance to be at 60KB because it would fully 
  351.   utilize the available space inside of a TCP/IP packet, avoid any packet 
  352.   fragmentation. The reason why the results for 64KB buffers was worse 
  353.   than even the 32KB buffer was because there was fragmentation taking 
  354.   place.
  355.     Naturally, this leads to the question of what happens if you fail to 
  356.   use a buffer that is a multiple of 4KB. Well, on the transmission side,
  357.   the answer is not much for it is still possible to `page flip' the 
  358.   output buffer down to the device driver and so avoid copying data. 
  359.   However, on the receive side, you cannot do this indiscriminately as it 
  360.   is possible to destroy information the user's program has stored next to
  361.   the receive buffer. What has to happen in this case is that any part of 
  362.   an incoming buffer that does not completely fill a virtual memory page 
  363.   must be copied into the user's buffer. We did look at a number of tests
  364.   in which we used a fairly large buffer size (60144 and 49152) that 
  365.   wasn't a multiple of 4KB. The results were fairly consistent. If you 
  366.   forced a copy of data because your buffer was not exactly a multiple of 
  367.   4KB, the performance fell to about 27-28 MB/second, which still isn't 
  368.   that bad when compared to the competition. 
  369.     As for the TCP_NODELAY feature of ttcp, we are a little surprised that 
  370.   the -D switch didn't give more of a difference than observed.
  371.   
  372.   Copying Files over IRIS HIPPI:
  373.   ==============================
  374.     While blasting data in HIPPI-PH mode and doing memory-to-memory 
  375.   transfers with TCP/IP are interesting, there is a great deal of interest
  376.   in disk-to-disk transfers with rcp and ftp. While both of these routines
  377.   use TCP/IP, they also use the disks which add another level of 
  378.   complexity, i.e. disk performance.  So far, we had five or six users of
  379.   IRIS HIPPI call and complain about ftp performance in particular. They 
  380.   usually couldn't get more than four or five megabytes per second. Our 
  381.   first question is `How did you stripe your disks?' Inevitably, the 
  382.   answer was `Huh?' That is to say, what they really were doing was 
  383.   copying a file from a unstriped disk over IRIS HIPPI to another disk 
  384.   which was unstriped. Since the typical SCSI-II disk drive can read or 
  385.   write at between four to five megabytes per second, what they were 
  386.   actually doing was simply measuring how fast the disk drives could do 
  387.   I/O. Therefore, it is mandatory to use striped disks to get really good
  388.   disk-copy performance over IRIS HIPPI. 
  389.     Originally, we planned to get the largest disk farm we could to do 
  390.   these tests. Unfortunately, a number of outside pressures limited us to
  391.   a total of twelve disks. These were striped three disks each on two SCSI
  392.   controllers, so we ended up with six-way striping. Under ideal
  393.   conditions, we can often get about 14 MB/sec off of a SCSI controller 
  394.   which has three disks on it, so it is likely that we could get 20 to 25
  395.   megabytes off a the six-way striped configuration. As it turned out, 
  396.   there were other problems that we ran into.
  397.   
  398.   Copying Files with rcp.
  399.   =======================
  400.     While most people who buy HIPPI interfaces tend to use ftp for copying 
  401.   files, we decided look at rcp as well. We'll report those results first,
  402.   and then go into ftp a good deal deeper.
  403.     Our rcp copying tests were fairly simple. We used mkfile to create a 
  404.   number of files, varying in size from 1 megabyte to 1 gigabyte. Then we 
  405.   ran rcp to copy them over IRIS HIPPI using timex to see how long it 
  406.   took. Next, we did a divide and, viola, we had how many megabytes per
  407.   second rcp copied the files. 
  408.     This was done on both the 6-way striped disks as well on single 
  409.   unstriped disks to underscore that you really need to stripe your disks
  410.   if you want performance. The results are in Table 3; however, before we 
  411.   get to the actual numbers, we had better note that we did transform the
  412.   numbers slightly so that they are comparable to ftp's reported 
  413.   performance. As many of you know, ftp reports its performance in KB 
  414.   (1024), but the number printed is in base ten. In other words 1000 KB, 
  415.   or a megabyte, is really 1000 * 1024. Therefore, we converted the rcp 
  416.   performance to the same format so that apples-to-apples comparisons are 
  417.   possible to ftp performance. 
  418.     File copy performance of various sized files over IRIS HIPPI using rcp
  419.   on 6-way striped and unstriped disks. As noted above, data was converted
  420.   to be comparable to ftp performance results. 
  421.   
  422.  
  423.          File Size                  6-Way Striped     Unstriped
  424.            1 MB (1024*1024)        1.11 MB/second   1.04 MB/second
  425.           10 MB (10*1024*1024)     5.59 MB/second   4.36 MB/second
  426.          100 MB (100*1024*1024)    7.32 MB/second   4.59 MB/second
  427.            1 GB (1000*1024*1024)   7.45 MB/second   4.58 MB/second
  428.  
  429.                                  Table 3
  430.        File copy performance of various sized files over IRIS HIPPI 
  431.              using rcp on 6-way striped and unstriped disks
  432.  
  433.   
  434.     Quite clearly, the results show that striping the disks is important.
  435.   The performance for unstriped disks is limited to the disk's speed. In 
  436.   the case of 6-way striping, we got as much as 7.45 MB/second using rcp.
  437.   The lower performance shown for the 1 MB and 10 MB files is due to both 
  438.   TCP's self-regulation features (slow-start, MTU discovery, etc.), as 
  439.   well as to a rather set-up handshaking (user validation etc) that occurs
  440.   between rcp and rcpd. It is safe, however, to say that rcp can get about
  441.   7.45 MB/second at least with a striped disk as tested.
  442.     While 7.45 MB/second for the six-way striped disks is a lot better 
  443.   than the 4.5 MB/second number obtained from the unstriped disk, it is 
  444.   still nothing like the 20 to 25 MB/second that we could have gotten. 
  445.   The question is why? We explored this when we tested ftp performance on 
  446.   the same disk and files we used to test rcp.
  447.   
  448.   Copying Files with ftp.
  449.   =======================
  450.     Obviously, we were a little disappointed with the file copying 
  451.   performance we saw with rcp. So the first thing we did was to repeat the
  452.   test with ftp, using the same disk configurations and file sizes we used
  453.   in the rcp test. The results are shown in Table 4. We refer to this 
  454.   version of ftp as `standard' for it is the version shipped with IRIX 5.2.
  455.   As you will see, we ended up modifying ftp.  
  456.   
  457.  
  458.          File Size                  6-Way Striped     Unstriped
  459.            1 MB (1024*1024)        3.97 MB/second   3.35 MB/second
  460.           10 MB (10*1024*1024)     4.62 MB/second   4.01 MB/second 
  461.          100 MB (100*1024*1024)    5.91 MB/second   4.38 MB/second
  462.            1 GB (1000*1024*1024)   7.07 MB/second   4.45 MB/second
  463.  
  464.                                  Table 4
  465.         File copy performance of various sized files over IRIS HIPPI 
  466.           using standard ftp on 6-way striped and unstriped disks
  467.    
  468.  
  469.     Oh, well, so ftp is not any better than rcp. If anything, it has 
  470.   slightly worse performance. Please note that the apparent improvement in
  471.   the 1 MB file case, where ftp transferred data at 3.97 MB/second is 
  472.   really because rcp is doing that set-up handshaking we noted, and ftp 
  473.   isn't doing it. 
  474.     Once again, we are less than totally pleased with the results. After 
  475.   all, we have seen disk-to-disk copying done as much higher speeds than 
  476.   7 MB/second when six-way striped disks were used. And we also know that 
  477.   ttcp can run nearly 48 MB/second over IRIS HIPPI. However, those disk-
  478.   file copying tests were not done with cp, but with special purpose 
  479.   programs that took advantage of the features of IRIX. Perhaps the 
  480.   problem is in ftp. As it turned out, it was.  About this time, we 
  481.   decided to have a hard look at ftp. That is, we dug the sources out and 
  482.   looked at what it was doing. And, guess what? It was doing its I/O, both
  483.   to and from disk as well as to TCP/IP in 16 KB blocks. While this is 
  484.   adequate for, say, copying files over the internet, it is nothing like 
  485.   the software needed to drive megabytes over the HIPPI interface. 
  486.     Careful examination of ftp's sources disclosed a number of other flaws
  487.   that would limit disk as well as network performance. However, the 
  488.   biggest problem was the 16 KB I/O being used. So, we got out our 
  489.   software meat axe and hacked ftp a bit. 
  490.     Actually, all we did was to increase the buffer size definition, which
  491.   in turn, increased the nbyte parameter in the reads and writes because 
  492.   they were defined in terms of sizeof(buffer). Thus, it was very easy to 
  493.   change the I/O size being used not only to and from disk, but also over 
  494.   the IRIS HIPPI interface as well. We chose two new buffer sizes: 60KB 
  495.   and 960 KB. The 60 KB size was chosen because it is the sweet spot we 
  496.   found with ttcp in Table 2, and 960 KB was was 16 times as large. In 
  497.   hindsight, we should have used even bigger buffer sizes.
  498.     First, the results of the 60 KB version of ftp. Both ftp and ftpd were 
  499.   modified as noted above. Then we repeated the testing we did on the 
  500.   standard version of ftp.  Both ftp and ftpd were modified to do I/O in 
  501.   60KB buffers.  
  502.  
  503.   
  504.          File Size                  6-Way Striped     Unstriped
  505.         1 MB (1024*1024)           3.54 MB/second  3.41 MB/second
  506.        10 MB (10*1024*1024)        7.21 MB/second  4.23 MB/second
  507.       100 MB (100*1024*1024)       7.79 MB/second  4.43 MB/second
  508.         1 GB (1000*1024*1024)      7.72 MB/second  4.39 MB/second
  509.  
  510.                                  Table 5
  511.         File copy performance of various sized files over IRIS HIPPI 
  512.              using ftp on 6-way striped and unstriped disks
  513.  
  514.  
  515.     That's better! However, it isn't a whole lot better than rcp. However,
  516.   it does show that the performance problem is not in IRIS-HIPPI but in 
  517.   ftp itself. So, let's try the 960 KB buffer size.  Both ftp and ftpd 
  518.   were modified to do I/O in 960KB buffers.
  519.  
  520.   
  521.          File Size                  6-Way Striped     Unstriped
  522.         1 MB (1024*1024)           3.32 MB/second  3.29 MB/second
  523.        10 MB (10*1024*1024)        7.69 MB/second  4.32 MB/second
  524.       100 MB (100*1024*1024)       9.51 MB/second  4.53 MB/second
  525.         1 GB (1000*1024*1024)      9.52 MB/second  4.28 MB/second
  526.  
  527.                                  Table 6
  528.       File copy performance of various sized files over IRIS HIPPI 
  529.             using ftp on 6-way striped and unstriped disks
  530.  
  531.   
  532.     Still better, but not quite 10 MB/sec. However, it is now very clear 
  533.   that there are still other problems in ftp that need to be solved if we
  534.   are to get warp-speed performance. We looked at them and decide to leave
  535.   them alone as it would take a major rewrite of ftp to do what was really
  536.   necessary. This consisted mainly on redoing the disk I/O buffering, and
  537.   we frankly didn't have the time. However, there were a few things we 
  538.   could do to get some idea just what performance we could eventually get.
  539.   One was to cheat on reading the disk by using two copies of ftp and ftpd
  540.   to read and write the same files at the same time. This is a bogus 
  541.   measure of disk I/O for what would happen is EFS simply reads the second 
  542.   stream of I/O out of the disk cache on the transmitting system. However, 
  543.   it would nevertheless send two streams of data through TCP/IP and IRIS 
  544.   HIPPI. Thus we could still measure the transfer rate over the network. 
  545.   We got an aggregate of 15.66 MB/second when we did this.
  546.    
  547.   Summary of ftp performance.
  548.   ===========================
  549.     Thus, in summary, ftp performance is really limited by the way the 
  550.   code is written. Clearly, much higher file transfer rates are possible 
  551.   when even simple things like increasing the I/O buffer sizes are done.
  552.